package com.example.provider.log.storage;

import com.example.api.common.entity.OperationLog;
import com.example.api.common.log.LogStorage;
import com.example.provider.mapper.OperationLogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;

public class MySQLLogStorage implements LogStorage {

    @Autowired
    private OperationLogMapper operationLogMapper;

    @Async
    @Override
    public void store(OperationLog log) {
        operationLogMapper.insert(log);
    }
}